# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: Andy Weidenbaum <archbaum@gmail.com>

pkgname=python-pyaes
_pipname=pyaes
pkgver=1.6.1
pkgrel=10
pkgdesc="Pure-Python Implementation of the AES block-cipher and common modes of operation"
arch=('any')
depends=('python')
makedepends=('python-setuptools')
url="https://github.com/ricmoo/pyaes"
license=('MIT')
source=(https://pypi.org/packages/source/${_pipname:0:1}/$_pipname/$_pipname-$pkgver.tar.gz)
sha256sums=('02c1b1405c38d3c370b085fb952dd8bea3fadcee6411ad99f312cc129c536d8f')

build() {
  cd "$_pipname-$pkgver"
  python setup.py build
}

package_python-pyaes() {
  cd $_pipname-$pkgver
  python setup.py install --root="$pkgdir/" --optimize=1
  install -D -m644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.txt
}
